package IO;

import java.io.FileNotFoundException;
import java.io.PrintStream;

/**
 * @author wuhan
 * @date 2019/10/10 15:48
 */
public class ExceptionInfo {
    public static void main(String[] args) throws FileNotFoundException {
        char[] chars=new char[10];
        try{
            System.out.println(chars[10]);
        }catch (ArrayIndexOutOfBoundsException e){
            System.setOut(new PrintStream("s.txt"));
            e.printStackTrace(System.out);
        }

    }
}
